Skip to content

Add shared library to build targets#285

Open
stlehmann wants to merge 6 commits intoBeckhoff:masterfrom
stlehmann:pyads-integration
Open

Add shared library to build targets#285
stlehmann wants to merge 6 commits intoBeckhoff:masterfrom
stlehmann:pyads-integration

Conversation

@stlehmann
Copy link
Copy Markdown

This PR resolves #284 by adding a shared library to the build targets. The compiled adslib.so is used by pyads, a thin Python wrapper for ADS.

The PR contains these changes:

  • set .gitattributes to set eol character to LF
  • add extern "C" statement to prevent name mangling. This is needed to access the functions by their proper names in the shared library.
  • Add a new build target to meson: adslib.so

@pbruenn
Copy link
Copy Markdown
Member

pbruenn commented Apr 2, 2026

@stlehmann unfortunately, its not so simple. This completely breaks the build for "-DUSE_TWINCAT_ROUTER". I try to fix that and I will squash most of your commits. especially the fixups.

@pbruenn
Copy link
Copy Markdown
Member

pbruenn commented Apr 2, 2026

@stlehmann please take a look at https://github.com/Beckhoff/ADS/tree/patrickbr/for-stlehmann-pyads-integration.

Is that working for your usecase?

The biggest problem with your original approach is that we have a more const correct API here in the standalone version, but when this is build with the original TwinCAT headers everything breaks as long as we use the same names for the exported C functions.

EDIT: Do we need this? c08e11c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Patches to integrate adslib directly into pyads

2 participants